import json
from conftest import BASE_DIR

#构造测试数据
def build_data():
    test_data = []
    file = BASE_DIR + r"/data/login.json"
    with open(file, encoding="utf-8") as f:
        json_data = json.load(f)
        for case_data in json_data:
            desc=case_data.get("desc")
            login_data = case_data.get("login_data")
            message = case_data.get("message")
            success = case_data.get("success")
            test_data.append((desc,login_data, message, success))

            #print(test_data)
    return test_data

if __name__ == '__main__':
    build_data()
